-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Port all lib.rs
code into binary
#11
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General direction looks good. Couple question for now.
src/main.rs
Outdated
}); | ||
let processor = TreeProcessor::new(&db_dir)?; | ||
let (tx, rx) = mpsc::channel::<Vec<CommitBlockInfoV1>>(5); | ||
processor.run(rx); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The returned JoinHandle
is not captured nor "awaited" here - how does this work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same behavior that we had before, we're just spawning the task inside this function instead. The thing with tokio
futures is that they will start executing as soon as they're spawned, await
will just wait until that task is done.
Co-authored-by: Tuomas Mäkinen <[email protected]>
1c62021
to
21f07d4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 👍
No description provided.